<h3><?php echo $title; ?></h3>



<div class="search_control">

<?php

	echo form_open('admin/user/search');

  //search field

  $data = array('name' => 'search', 'value' => '', 'id' => 'search');

  echo form_submit($data);

  $data = array('name' => 'keyword', 'value' => $keyword, 'class' => 'keyword');

  echo form_input($data);



  //Type

  $options = array(

		'id' => 'ID',

    'name' => 'Name'

	);

	echo form_dropdown('search_type', $options, $search_type);

	echo form_close();

?>

</div><!--search_control end-->



<?php echo form_open('admin/user/request'); ?>

<div class="control1">

<?php

	//add button

  echo link_image('admin/human/resource_create', 'images/admin/button_add.png');



  //delete button

  $data = array('name' => 'delete', 'value' => '', 'id' => 'delete');

  echo form_submit($data);



  //show field

  $data = array('name' => 'show', 'value' => '', 'id' => 'show');

  echo form_submit($data);

  $data = array('name' => 'row_number', 'value' => $_SESSION['row_number'], 'id' => 'show_number');

  echo form_input($data);

?>

</div><!--control1 end-->



<table class="default">
<?php

	if (is_array($result) )

	{

		//title

		echo '<tr>';

			echo '<th width="50" >';
			echo '&nbsp;',form_checkbox('all'),'&nbsp;All';
		echo '</th>';

    echo '<th width="70">Active</th>';

    echo '<th width="70">Code</th>';

		echo '<th width="400">Full Name</th>';

		echo '<th width="100">Info</th>';

		echo '</tr>';

		

		//print

		foreach ($result as $row)

		{

			echo '<tr>';



			//action

			echo '<td>';

			echo form_checkbox('select_id[]', $row['user_id']);

			echo '&nbsp;';

			echo anchor('admin/user/update/'.$row['user_id'], 'Edit');

			echo '</td>';



      //Active

			echo '<td>';

    //  echo $row['active'];

			echo '</td>';



      //Code

			echo '<td>';

      echo $row['user_id'];

			echo '</td>';



			//name

			echo '<td class="align_left">';

      $holot = html_entity_decode($row['last_name'], ENT_QUOTES, 'UTF-8');

      $ten = html_entity_decode($row['first_name'], ENT_QUOTES, 'UTF-8');

			echo $holot.' '.$ten;

			echo '</td>';			



			//Info

			echo '<td>';

			echo mailto($row['user_email'], 'Email');

      echo '&nbsp;'.anchor('#', 'Phone', 'title="'.$row['phone'].'"');

			echo '</td>';

			

			echo '</tr>';

		}

	}

	else

	{

		echo 'Data does not exist';

	}

?>

</table><!--end main content-->



<?php

	echo form_close(); //FORM END

?>